﻿#include "mythVirtualDecoder.hh"


mythVirtualDecoder::mythVirtualDecoder(void)
	:mythAvlist(){
	flag = 0;
	m_count = 0;
	ori_count = 0;
	ret_count = 0;
	m_thread = NULL;
}

void mythVirtualDecoder::start(bool usethread){
	if (usethread == true){
		if (!m_thread)
			m_thread = SDL_CreateThread(MainLoopStatic, "mainloop",this);
	}
	else{
		MainLoop();
	}
}
void mythVirtualDecoder::StopThread(){
	if (m_thread)
		SDL_WaitThread(m_thread,NULL);
	m_thread = NULL;
}

mythVirtualDecoder* mythVirtualDecoder::CreateNew(void){
	return new mythVirtualDecoder();
}
mythVirtualDecoder::~mythVirtualDecoder(void){
}

unsigned int mythVirtualDecoder::GetTimeCount(){
	return 0;
}
void mythVirtualDecoder::stop()
{
	flag = 1;
	StopThread();
}

int mythVirtualDecoder::MainLoop()
{
	return 0;
}
